home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 23.zip
/
BS1 part 23
/
Prof page II type.adf
/
Install
/
RamCopy
< prev
next >
Wrap
AmigaDOS Script File
|
1990-08-10
|
2KB
|
68 lines
.KEY src/A,dest/A,name,verb
.BRA {
.KET }
; Try to copy src to dest via RAM:, to save disk swaps if it's a
; single-floppy, no-HD system.
; Failing that, copy directly from src to dest.
failat 21
echo >ENV:GDIRC "ok" ; Default return code
; Try to copy via RAM:. If we can't delete an old TempCopy, or can't
; create the new one, punt and try to copy directly. But a failure
; to copy from TempCopy to dest is a real error -- don't bother retrying.
if exists GD_TempDir:TempCopy
delete >NIL: GD_TempDir:TempCopy all
if error
skip RamCopyDirect
endif
endif
; Disable autorequesters for the copy to GD_TempDir:, to avoid
; worrying the user if it fills up.
; We do a dirsize on the source first, to make sure that disk is
; inserted before the autorequesters get turned off.
if exists {src} ; Some fast access to the source
endif
instutil disable
copy >NIL: {src} to GD_TempDir:TempCopy all quiet
if error
instutil enable ; Turn autorequesters back on
skip RamCopyDirect
endif
instutil enable
copy GD_TempDir:TempCopy {dest} all quiet
if error
echo >ENV:GDIRC "error"
endif
delete GD_TempDir:TempCopy all quiet
skip RamCopyWrapup
; RAM: copy failed. Try to do it directly.
lab RamCopyDirect
delete >NIL: GD_TempDir:TempCopy all ; Get back some memory
copy {src} {dest} all quiet
if error
echo >ENV:GDIRC "error"
endif
lab RamCopyWrapup
failat 10
if $GDIRC eq "ok"
if not "{name}" eq ""
echo "{name} {verb}"
endif
else
if not "{name}" eq ""
echo "*E[;33m{name} not {verb}*E[m"
endif
echo >GD_TempDir:Message "*E[;33m Installation did not complete properly.*E[m"
endif